package com.wlyuan.open.application.service;

import com.wlyuan.core.domain.annotation.Publisher;
import com.wlyuan.core.domain.event.DomainEvents;
import com.wlyuan.open.api.IOpenApiLogService;
import com.wlyuan.open.domain.api.event.CreateApiLogEvent;
import com.wlyuan.open.dto.api.OpenApiLogCreationDTO;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;

/**
 * @author lijing
 * @description
 */
@DubboService
@Slf4j
@RequiredArgsConstructor
public class OpenApiLogServiceImpl implements IOpenApiLogService {

    @Override
    @Publisher
    public void add(OpenApiLogCreationDTO creation) {
        DomainEvents.add(new CreateApiLogEvent(creation));
    }
}
